﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using Kotonoha.Server.Dictionaries;

namespace Kotonoha.Server.UI.Resolver {
    /// <summary>
    /// Interaction logic for WordResolver.xaml
    /// </summary>
    public partial class WordResolver : Window {
        public IList<WordEntry> ResolvedWords { 
            get {
                IList<WordEntry> entries = new List<WordEntry>();
                foreach (var o in WordList.SelectedItems) {
                    entries.Add((WordEntry)o);
                }
                return entries;
            }
        }
        
        public WordResolver() {
            InitializeComponent();
        }

        private void Window_Loaded(object sender, RoutedEventArgs e) {
            WordList.ItemsSource = (IEnumerable) DataContext;
        }
    }
}
